package com.wjk.cms.pojo;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;

/**
 * 用户
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Entity
@Table(
        name = "t_user"
)
public class User extends BaseEntity {

    private static final long serialVersionUID = 1L;



    @Column(columnDefinition = "varchar(100)  COMMENT '用户名'")
    private String name;


    @Column(columnDefinition = "varchar(100)  COMMENT '密码'")
    private String password;

    @JsonIgnore
    @Column(columnDefinition = "varchar(100)  COMMENT '加密盐'")
    private String salt;

    @Column(columnDefinition = "bigint(11) COMMENT '上级用户id'")
    private Long parentId;

    @Column(columnDefinition = "varchar(100)  COMMENT '状态(0 初始 1审核通过 2审核不通过)' default'0'")
    private String status;

    @Column(columnDefinition = "varchar(100)  COMMENT '身份(0普通 1渠道商 2经销商 )' default'0'")
    private String type="0";

    @Column(columnDefinition = "varchar(100)  COMMENT '手机号'")
    private String phone;

    @Column(columnDefinition = "varchar(100)  COMMENT '结算价' default'0'")
    private String price;

    @Column(columnDefinition = "varchar(255)  COMMENT '微信头像'")
    private String headPortrait;

    @Column(columnDefinition = "varchar(100)  COMMENT '微信unionid'")
    private String unionid;

    @Column(columnDefinition = "varchar(255)  COMMENT '微信昵称'")
    private String nickname;

    @Column(columnDefinition = "varchar(100)  COMMENT '微信openid(xcx)'")
    private String wxXcxOpenid;

    @Column(columnDefinition = "varchar(300)  COMMENT '备注'")
    private String remark;


    @Column(columnDefinition = "varchar(255)  COMMENT '地址'")
    private String address;

    @Column(columnDefinition = "varchar(300)  COMMENT '审核备注'")
    private String auditRemark;

    @Transient
    private int receiveNum;

    @Transient
    private int dealNum;
    @Transient
    private String statusText;






}
